Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(agents-api,integrations): Working integrations for tool-call step #521

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Sep 25, 2024

  • fix(typespec,agents-api): Rename integration providers
  • feat(agents-api,integrations): Working integrations for tool-call step

Important

Add integration service handling for tool-call steps in agents API, including provider renames and workflow updates.

  • Integrations:
    • Implement run_integration_service in clients/integrations.py to handle integration service calls.
    • Update execute_integration in activities/execute_integration.py to use run_integration_service for non-dummy providers.
    • Add INTEGRATION_SERVICE_URL to .env.example, env.py, and docker-compose.yml.
  • Renames:
    • Rename integration providers in Tools.py and scalars.tsp (e.g., dall-e to dalle_image_generator).
  • Workflows:
    • Update task_execution/__init__.py to handle integration tool calls using execute_integration.
  • Tests:
    • Add integration_example.yaml for sample tasks.
    • Add tests for integration tool calls in test_execution_workflow.py.
    • Add patch_integration_service in utils.py for mocking integration service calls.

This description was created by Ellipsis for f13f8dd. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to f13f8dd in 33 seconds

More details
  • Looked at 423 lines of code in 12 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 drafted comments based on config settings.
1. agents-api/agents_api/activities/execute_integration.py:43
  • Draft comment:
    Catching BaseException is not recommended as it includes system-exiting exceptions. Consider catching more specific exceptions instead.
  • Reason this comment was not posted:
    Comment was on unchanged code.
2. agents-api/agents_api/activities/execute_integration.py:50
  • Draft comment:
    mock_execute_integration is set to execute_integration, which is redundant. Consider removing mock_execute_integration and directly using execute_integration.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The mock_execute_integration is set to execute_integration, which seems redundant since execute_integration is already defined. This could be simplified.
3. agents-api/agents_api/autogen/Tools.py:92
  • Draft comment:
    Ensure that the updated provider names (e.g., dalle_image_generator, duckduckgo_search) are consistently used across all relevant files, including tests and other modules.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The IntegrationDef class has been updated to use new provider names, but the changes should be consistent across all files where these literals are used.
4. agents-api/agents_api/clients/integrations.py:24
  • Draft comment:
    Consider adding exception handling for the HTTP request to manage potential errors, such as network issues or server errors.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is relevant to the changes made in the diff, as it pertains to the new function 'run_integration_service'. The suggestion to add exception handling is actionable and could improve the robustness of the code by handling network issues or server errors that 'raise_for_status()' does not cover. This aligns with the rule that suggests code quality refactors are good if they are actionable and clear.
    The comment might be considered speculative since it assumes potential errors without evidence of them occurring. However, exception handling is a common practice to ensure robustness in network requests.
    While the comment could be seen as speculative, it is a reasonable suggestion for improving code quality and robustness, which is a valid concern in network operations.
    Keep the comment as it provides a clear and actionable suggestion to improve the code's robustness by adding exception handling for network requests.
5. agents-api/agents_api/env.py:74
  • Draft comment:
    Ensure that INTEGRATION_SERVICE_URL is set appropriately for different environments, as the default http://0.0.0.0:8000 might not be suitable for production.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The integration_service_url is set to a default value that might not be suitable for production environments.
6. agents-api/agents_api/workflows/task_execution/__init__.py:493
  • Draft comment:
    Ensure that the keys provider, setup, and method exist in integration_spec.spec to avoid potential KeyError. Consider using .get() with default values.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_Ma7Pi9akdB8JoohC


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@whiterabbit1983 whiterabbit1983 merged commit ed33cf9 into dev Sep 25, 2024
4 of 7 checks passed
@whiterabbit1983 whiterabbit1983 deleted the f/integrations-tool-step branch September 25, 2024 20:58
creatorrr added a commit that referenced this pull request Sep 30, 2024
#521)

- **fix(typespec,agents-api): Rename integration providers**
- **feat(agents-api,integrations): Working integrations for tool-call
step**

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Add integration service handling for tool-call steps in agents API,
including provider renames and workflow updates.
> 
>   - **Integrations**:
> - Implement `run_integration_service` in `clients/integrations.py` to
handle integration service calls.
> - Update `execute_integration` in `activities/execute_integration.py`
to use `run_integration_service` for non-dummy providers.
> - Add `INTEGRATION_SERVICE_URL` to `.env.example`, `env.py`, and
`docker-compose.yml`.
>   - **Renames**:
> - Rename integration providers in `Tools.py` and `scalars.tsp` (e.g.,
`dall-e` to `dalle_image_generator`).
>   - **Workflows**:
> - Update `task_execution/__init__.py` to handle integration tool calls
using `execute_integration`.
>   - **Tests**:
>     - Add `integration_example.yaml` for sample tasks.
> - Add tests for integration tool calls in
`test_execution_workflow.py`.
> - Add `patch_integration_service` in `utils.py` for mocking
integration service calls.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for f13f8dd. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

---------

Signed-off-by: Diwank Singh Tomer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants